<template>
  <van-card
    v-for="currentNew of news"
    :price="currentNew.source"
    :desc="currentNew.digest"
    :title="currentNew.title"
    :thumb="currentNew.imgList[0]"
    currency=""
  >
    <!-- <template #tags>
      <van-tag plain type="primary">标签</van-tag>
      <van-tag plain type="primary">标签</van-tag>
    </template>
    <template #footer>
      <van-button size="mini">按钮</van-button>
      <van-button size="mini">按钮</van-button>
    </template> -->
  </van-card>
</template>

<script setup>
import { onMounted, ref } from "vue";
import { getSportNews } from "../services/apiSportNew.js";

const news = ref([]);

onMounted(async () => {
  const sportNews = await getSportNews();

  news.value = sportNews;
});
</script>
